<?php


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
 <head>
 <title>Free Geocoder - Get Latitude Longitude</title>
 <meta name="Description" content="Google Maps Coordinate Finder. Get the latitude and longitude of a point.">
 <meta name="Keywords" content="geocode, geocoder, google maps, latitude, longitude">

 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
 <script src="http://maps.google.com/maps?file=api&v=<?php echo $_GET['ver']; ?>&key=<?php echo $_GET['key']; ?>" type="text/javascript"></script>

<script type="text/javascript">
//<![CDATA[
var map;

 function clearmap( mk )
 {
 document.getElementById("message").innerHTML = "" ;
 map.clearOverlays() ;
 lastclick = "" ;
 }

// Check for a double click...

 function checkclick ( point )
 {
 if ( lastclick != point )
 {
 lastclick = point ;
 
 var zoomlvl = map.getZoomLevel();

 fc( point, zoomlvl) ;
 }
 }

 
 function fc( point, zoomlvl )
 {
	var html = "";

	map.centerAndZoom( point, zoomlvl) ;

	html += html + "Longitude , Latitude <br>" + map.getCenterLatLng(point);
	
	var marker = new createMarker(point, html);
		
 map.addOverlay(marker);

 }


 function createMarker(point, html) 
 {
 var marker = new GMarker(point);
 GEvent.addListener(marker, "click", function()
 {
 marker.openInfoWindowHtml(html);
 window.opener.document.getElementById("googlemaps_lon").value = marker.getPoint().lng() ;
 window.opener.document.getElementById("googlemaps_lat").value = marker.getPoint().lat() ;
 
 });
 return marker;
 }

 //]]>
</script>

</head>
<body bgcolor="#eeeeee" text="black">
  <center>
  <table border=1 bgcolor="#cccccc" cellPadding=0 cellSpacing=2 width="100%" height="85%">
    <tr>
      <td>

        <table border=0 cellPadding=2 cellSpacing=2 bgcolor="#fffce0">
          <tr>
            <td bgcolor="#000000">
              <script language="javascript">
 <!--
 if( window.innerHeight )
 {
 var width = window.innerWidth - 40 ;
 var height = window.innerHeight - 130 ; 
 } else
 {
 var width = document.documentElement.offsetWidth - 50 ;
 var height = document.documentElement.offsetHeight - 100 ; 
 }
 document.write('<div id="map" style="width: ' + width + 'px; height:' + height + 'px">') ;
 // -->
              </script>
 </div>
            </td>
          </tr>
          <tr>
            <form name=cf onsubmit="javascript:return false;">
            <td valign=top align="center">
              <div id="form">
                <input type=BUTTON value="World" onclick="showWorld()" name="World">
                <input type=BUTTON value="North & Central America" onclick="showNAmerica()" name="NAmerica">
                <input type=BUTTON value="South America" onclick="showSAmerica()" name="SAmerica">
                <input type=BUTTON value="Europe" onclick="showEurope()" name="Europe">
                <input type=BUTTON value="Africa" onclick="showAfrica()" name="Africa">
                <input type=BUTTON value="Oceania" onclick="showOceania()" name="Oceania">
                <input type=BUTTON value="Asia" onclick="showAsia()" name="Asia">
                <br /><input type=BUTTON value="Clear Map" onclick="clearmap(cf)" name="CLEARBUTTON">
                <font face="verdana" size=1>
                <center><b>Geocoder - Coordinates</b></center>
                To move the map hold the mouse button down while moving the mouse. To enlarge a particular area use the controls on the left side of the map. When you click on a particular spot a marker will be generated at that point. Click on the marker to display the longitude/latitude of the point. On click on a particular marker the coordinates are processed to the Backend-Field by system.
                <br />Click the Clear Map Button to remove the marker(s).
                <br />Service provided by.. </font>
                <a href="http://web.casa-loca.com/"><font size="1"><b>casa-loca.com</b></font></a><br><br><a href="/"></a>
              </div>
            </td>
            </form>
          </tr>
        </table>

      </td>
    </tr>
    <tr>
      <td>
        <div id="message"></div>
      </td>
    </tr>
  </table>
  </center> <!-- google map script -->
<script language="javascript">
 <!--
   function showEurope() {
    var point = new GPoint(7.767033576965332, 48.578992135261295) ; // Strassbourg
    map.centerAndZoom(point,13);
  }
  function showNAmerica() {
    var point = new GPoint(-93.8671875, 36.31512514748051) ; // NAmerica
    map.centerAndZoom(point,14);
  }
  function showSAmerica() {
    var point = new GPoint(-59.94140625, -19.31114335506464) ; // SAmerica
    map.centerAndZoom(point,14);
  }
  function showAfrica() {
    var point = new GPoint(24.08203125, -1.0546279422758742) ; // Africa
    map.centerAndZoom(point,14);
  }
  function showAsia() {
    var point = new GPoint(92.4609375, 40.84706035607122) ; // Asia
    map.centerAndZoom(point,14);
  }
  function showOceania() {
    var point = new GPoint(139.04296875, -22.268764039073965) ; // Oceania
    map.centerAndZoom(point,14);
  }
  function showWorld() {
    var point = new GPoint(9.84375, 41.50857729743935) ; // World
 map.centerAndZoom(point,16);
  }
 
 var lastclick = "" ;				// Last Clicked Point
 var map = new GMap(document.getElementById("map"));
 map.addControl(new GLargeMapControl());
 map.addControl(new GMapTypeControl());
 map.addControl(new GScaleControl()) ;
 var point = new GPoint(9.84375, 41.50857729743935) ; // World
 map.centerAndZoom(point,16);
 GEvent.addListener(map, 'click', function(overlay, point)
 {
 if (overlay)
 {
 } else if (point) 
 {
 checkclick( point ) ;
 }
 });
 // -->
</script>
</body>
</html>
<?php
?>
